Advent Of Code 2017: Day 2 - Ruby Solution